@use '../../styles/variables.scss' as *;

.#{$sun-prefix}-base-icon {
  display: inline-block;
  font-style: normal;
  line-height: 0;
  text-align: center;
  text-transform: none;
  text-rendering: optimizelegibility;
  color: inherit;

  // ============================ 尺寸 ============================
  &-size {
    &-inherit {
      font-size: inherit;
    }

    &-extra-small {
      font-size: $width-icon_extra_small;
    }

    &-small {
      font-size: $width-icon_small;
    }

    &-medium {
      font-size: $width-icon_medium;
    }

    &-large {
      font-size: $width-icon_large;
    }

    &-extra-large {
      font-size: $width-icon_extra_large;
    }
  }

  // ============================ 持续旋转 =========================
  &-spin {
    animation: #{$sun-prefix}-base-icon-animation-spin
      $motion-icon_spin-animationDuration linear infinite;
    animation-fill-mode: forwards;
  }
}

@keyframes #{$sun-prefix}-base-icon-animation-spin {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(360deg);
  }
}
